<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态的网络请求</title>
    <script src="js/jquery-3.2.1.min.js"></script>
</head>
<body>
ajax:基于异步的js网络请求
<input type="button" value="发送请求" class="btn">
<div class="ctn">

</div>
<script>
    $(".btn").click(function () {
       //发送网络请求
       $.ajax({
           url:"http://172.16.16.63:8081/json",
           success:function (re) {
               console.log(re.sname);
               $(".ctn").html(re.sname);
           }
       })
    });
</script>
</body>
</html>